package com.jason.happy.common.utils;

import com.jason.happy.common.utils.image.strategy.ImageStrategy;

/**
 * Created by hacker on 17-6-27.
 */

public class ImageManager {

    private static ImageStrategy imageStrategy;

    public static void init(ImageStrategy imageStrategy){
        ImageManager.imageStrategy = imageStrategy;
    }

    public static void downloadImage(String url){
        imageStrategy.downloadImage(url);
    }

    /**
     * @param url
     */
    public static void downloadImageToDiskCache(String url) {
        imageStrategy.downloadImageToDiskCache(url);
    }

    /**
     * @param url
     */
    public static boolean isCacheInDisk(String url) {
        return imageStrategy.isCacheInDisk(url);
    }

}
